package com.itheima;


import com.itheima.service.BookService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        //创建IoC容器,加载核心配置文件
        ClassPathXmlApplicationContext ctx =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        //获取bean对象
        BookService bookService = ctx.getBean(BookService.class);
        //BookService bookService = (BookService)ctx.getBean("bookService");
        //调用方法
        bookService.save();
    }
}
